package lookas;
public class ThreadTest{

    private static int y = 0;

    public static void main(String[] args){
        Runnable q = new Runnable(){
            public void run(){
                System.out.println(y);
                try{
                    Thread.sleep(10000 * (11 - y));
                }catch(InterruptedException e){
                    System.out.println(e);
                }
            }
        };
        for(int i = 0; i < 10; i++){
            y = i;
            new Thread(q).start();
        }
    }
}
